Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zigbee): Increase timeout, commision again on failure + setScanDuration #10651

Merged

Conversation

P-R-O-C-H-Y
Copy link
Member

Description of Change

This PR adds a fix, so there is no need to restart the device after commissioning fails.
The Zigbee will try to connect for 30s to the already joined network, if not successful the Zigbee.begin() returns false meaning a need to device restart.

Also added an API to set the scan duration, used when discovering the networks when trying to join.
By default I set the biggest value 4. It can be set within 1-4.

Tests scenarios

Tested locally, no need for device restart at all now.
Always connects / rejoins.

Related links

#10612
#10601

@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Nov 25, 2024
@P-R-O-C-H-Y P-R-O-C-H-Y added the Area: Libraries Issue is related to Library support. label Nov 25, 2024
@P-R-O-C-H-Y P-R-O-C-H-Y added the Status: Review needed Issue or PR is awaiting review label Nov 25, 2024
Copy link
Contributor

github-actions bot commented Nov 25, 2024

Warnings
⚠️
	The **target branch** for this Pull Request **must be the default branch** of the project (`master`).

	If you would like to add this feature to a different branch, please state this in the PR description and we will consider it.
Messages
📖 You might consider squashing your 3 commits (simplifying branch history).

👋 Hello P-R-O-C-H-Y, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- Addressing info messages (📖) is strongly recommended; they're less critical but valuable.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 145097c

Copy link
Contributor

github-actions bot commented Nov 25, 2024

Test Results

 61 files   61 suites   5m 49s ⏱️
 21 tests  21 ✅ 0 💤 0 ❌
143 runs  143 ✅ 0 💤 0 ❌

Results for commit 145097c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32C60‼️ +17K0.00‼️ +3.240⚠️ +16960.00‼️ +5.71
ESP32H20‼️ +14K0.00‼️ +2.500⚠️ +15960.00‼️ +5.50
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C6ESP32H2
ExampleFLASHRAMFLASHRAM
Zigbee/examples/Zigbee_Color_Dimmable_Light‼️ +17K⚠️ +1680‼️ +14K⚠️ +1580
Zigbee/examples/Zigbee_Color_Dimmer_Switch‼️ +9K⚠️ +936‼️ +6K⚠️ +860
Zigbee/examples/Zigbee_On_Off_Light‼️ +16K⚠️ +1696‼️ +13K⚠️ +1596
Zigbee/examples/Zigbee_On_Off_Switch‼️ +10K⚠️ +920‼️ +6K⚠️ +860
Zigbee/examples/Zigbee_Scan_Networks‼️ +13K⚠️ +1260‼️ +9K⚠️ +1128
Zigbee/examples/Zigbee_Temp_Hum_Sensor_Sleepy‼️ +14K⚠️ +972‼️ +11K⚠️ +832
Zigbee/examples/Zigbee_Temperature_Sensor‼️ +12K⚠️ +944‼️ +8K⚠️ +836
Zigbee/examples/Zigbee_Thermostat‼️ +11K⚠️ +608‼️ +8K⚠️ +540

@SuGlider SuGlider added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Nov 25, 2024
@SuGlider SuGlider merged commit 0f3191e into espressif:release/v3.1.x Nov 25, 2024
49 checks passed
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull request Nov 27, 2024
* fix(zigbee): Increase timeout, commision again on failure + setScanDuration (espressif#10651)
* fix(zigbee): Increase timeout, commision again on failure
* fix(zigbee): Update library keywords

* feat(Matter): add new MatterColorLight endpoint (espressif#10654)

* feat(matter): adds Matter Color Light endpoint

---------

Co-authored-by: Rodrigo Garcia <[email protected]>
Co-authored-by: Jan Procházka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Libraries Issue is related to Library support. Status: Pending Merge Pull Request is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants